
**************************************
* 8 months after entry
**************************************

clear

* load data for the PACT taken 8 months after release from facility
use Probation CPACT.dta


drop if lastpact!=1
save Probation CPACT lastpact.dta, replace


* build the indicators, factors and sumary variables
 do Factors_ReSTAT
 
* build the specific noncognitive variables
 do Noncog_Detail_ReSTAT

* define pact date for this pact score 
rename pactdte pactdte8

* standardize and rename the variables
foreach x in skills_r  agg_r att_r noncog_r  agg implsv attitude ///
    socskill future gangz mental_health {
	rename `x' `x'_8
	egen `x'_82=std(`x'_8)
	}
	

* make file for merge
keep RELEASE_YR ID_VAR FILE_TYPE CAR_CPACT lastpact firstpact  skills_r_82 agg_r_82 att_r_82 noncog_r_82  agg_82 implsv_82 attitude_82 socskill_82 future_82 gangz_82 mental_health_82
save Probation_CPACT_8_ReSTAT.dta, replace 

clear


